package com.itheima.edu.info.manager.controller;

import com.itheima.edu.info.manager.service.TeacherService;

import java.util.Scanner;

public class TeacherController {
    public void start() {
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("--------欢迎来到 <教师> 管理系统--------");
            System.out.println("请输入您的选择: 1.添加教师  2.删除教师  3.修改教师  4.查看教师  5.退出");
            String choice = sc.next();
            switch (choice){
                case "1" -> {
                    TeacherService service = new TeacherService();
                    service.add();
                }
                case "2" -> {
                    TeacherService service = new TeacherService();
                    service.remove();
                }
                case "3" -> {
                    TeacherService service = new TeacherService();
                    service.change();
                }
                case "4" -> {
                    TeacherService service = new TeacherService();
                    service.find();
                }
                case "5" -> {
                    System.out.println("感谢您使用教师管理系统，再见");
                    return;
                }
                default -> System.out.println("您输入的信息有误");
            }
        }
    }
}
